package com.plm.frame.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.plm.frame.mapper.FavoriteMapper;
import com.plm.frame.model.Favorite;
import com.plm.frame.service.FavoriteService;



@Service
@Transactional  //此处不再进行创建SqlSession和提交事务，都已交由spring去管理了。
public class FavoriteServiceImpl implements FavoriteService {
	
	@Resource
	private FavoriteMapper mapper;

	@Override
	public List<Favorite> selectFavorite(Favorite favorite) {
		// TODO Auto-generated method stub
		return mapper.selectFavorite(favorite);
	}

	@Override
	public void addFavorite(Favorite favorite) {
		// TODO Auto-generated method stub
		mapper.addFavorite(favorite);
	}

	@Override
	public void deleteFavorite(Favorite favorite) {
		// TODO Auto-generated method stub
		mapper.deleteFavorite(favorite);
	}


	


}
